package cn.explink.dop.enums;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @ClassName: OrderIsSettleDeliveryEnum
 * @Description: 订单是否已经结算派费
 * @author 孟凡岭
 * @date 2015年5月6日 上午9:48:48
 * @since AR1.0
 */
public enum OrderIsSettleDeliveryEnum {

	NOT_SETTLE(0, "未结算"), SETTLE(1, "已结算");
	private int value;

	private String text;

	private OrderIsSettleDeliveryEnum(int value, String text) {
		this.value = value;
		this.text = text;
	}

	public int getValue() {
		return this.value;
	}

	public String getText() {
		return this.text;
	}

	public static List<OrderIsSettleDeliveryEnum> getAllStatus() {
		List<OrderIsSettleDeliveryEnum> orderStatusEnumList = new ArrayList<OrderIsSettleDeliveryEnum>();
		orderStatusEnumList.add(NOT_SETTLE);
		orderStatusEnumList.add(SETTLE);
		return orderStatusEnumList;
	}

	public static String getTextByValue(int value) {
		List<OrderIsSettleDeliveryEnum> allStatus = OrderIsSettleDeliveryEnum.getAllStatus();
		for (OrderIsSettleDeliveryEnum orderStatusEnum : allStatus) {
			if (orderStatusEnum.getValue() == value) {
				return orderStatusEnum.getText();
			}
		}
		return "";
	}
}
